<?php

namespace app\admin\validate;

use think\Validate;

class Role extends Validate
{
    protected $rule =   [
        'roleCode' => 'require',
        'roleName' => 'require',
        'menu_ids' => 'require',
        'id' => 'require',
        'ids' => 'require',
    ];

    protected $message = [
        'roleCode.require' => '缺少参数role',
        'roleName.require' => '缺少参数label',
        'menu_ids.require' => '缺少参数menu_ids',
        'id.require' => '缺少参数id',
        'ids.require' => '缺少参数ids',
    ];

    protected $scene = [
        'add' => ['roleCode', 'roleName'],
        'edit' => ['id'],
        'del' => ['id'],
        'dels' => ['ids'],
    ];
}